package com.example.infrastructure.domain.organization.repo;

import com.example.infrastructure.domain.organization.aggregate.Organization;
import com.example.infrastructure.domain.organization.repo.po.OrganizationPo;
import org.springframework.data.domain.Example;
import org.springframework.data.jpa.domain.Specification;

import java.util.List;
import java.util.Optional;

/**
 * TODO
 *
 * @author lxh
 * @date 2020/11/17 下午1:31
 **/
public interface OrganizationRepo {
    Optional<Organization> findOne(Example<Organization> example);

    List<Organization> findAllByExample(Example<Organization> example);

    List<Organization> findAllBySpecification(Specification<OrganizationPo> specification);

    Organization save(Organization organization);

    void deleteById(String id);

    void delete(Organization organization);
}
